class Dog:

    def __init__(self, name):
        self.name = name

    def game(self):
        return "狗在玩"


class XiaoTianQuan(Dog):
    def __init__(self, name):
        super().__init__(name)
        self.name = name

    def game(self):
        return "哮天犬在玩游戏"


class Person:
    def __init__(self, name):
        self.name = name

    def game_with_dog(self, dog):
        print(dog.game())


if __name__ == '__main__':
    xiao_gou = Dog("小狗")
    xiao_lin = Person("小玲")
    xiao_lin.game_with_dog(xiao_gou)

    xiao_gou = XiaoTianQuan("哮天犬")
    xiao_lin.game_with_dog(xiao_gou)
